import redis


# 构造Redis连接对象
redis_conn = redis.StrictRedis(
    host='localhost',
    port=6379,
    password='',
    decode_responses=True
)

ret = redis_conn.execute_command('set k1 01')
print(ret)
print(type(ret))
ret = redis_conn.execute_command('keys *')
print(ret)